Generating Go Bindings with Docker#180
Generating Go Bindings with Docker#180akutz wants to merge 1 commit intocontainer-storage-interface:masterfrom
Conversation
This patch introduces the ability to generate Go language bindings using
Docker with `Dockerfile-go`:
# builds the container image
$ docker build -t csi/spec -f Dockerfile-go .
# emits the go bindings to stdout
$ docker run --rm csi/spec
# emits the protobuf to stdout
$ docker run --rm csi/spec csi.proto
|
I like the idea of containerizing the build process. How do you envision this being used? Would Makefile be modified to build and run the container? |
|
Hi @saad-ali, This is just a short-cut for now. Ultimately, even if the Travis-CI build went to sudo mode to utilize this process, we'd still want to employ So, in other words, the first step is merging #113, then building on that with this to have the option to do a Docker build with known dependencies and required tools, such as |
|
Hi @saad-ali, Additionally, I'd likely publish |
|
However, even as an executable image, we'd still need |
| FROM alpine:3.7 | ||
| RUN mkdir /csi | ||
| WORKDIR /csi | ||
| COPY --from=0 /csi/csi.pb.go . |
There was a problem hiding this comment.
Just a nit, you can name each stage with FROM golang:1.9.3 AS build and then use COPY --from=build
There was a problem hiding this comment.
Hi @cpuguy83,
Thanks! I've actually done that, but since this was a single stage being referenced I didn't care.
Ideally the Makefile would not require a container. |
|
Replaced by #181 |
This patch introduces the ability to generate Go language bindings using
Docker with
Dockerfile-go: